/*
 * @Description: 个人组件封装
 * @Author: HuiSir<https://gitee.com/huisir001>
 * @Date: 2021-09-01 17:33:54
 * @LastEditTime: 2025-09-28 17:32:33
 */
import { App, Component } from "vue";
import Icon from "./Icon/index.vue";
import Table from "./Table/index.vue";
import RowBtns from "./Table/RowBtns.vue";
import Form from "./Form/index.vue";
import FormDialog from "./FormDialog/index.vue";
import FormPage from "./FormPage/index.vue";
import DetailDialog from "./DetailDialog/index.vue";
import IconSelect from "./IconSelect/index.vue";
import TreeSelect from "./TreeSelect/index.vue";
import FuzzySearch from "./FuzzySearch/index.vue";
import ListCard from "./ListCard/index.vue";
import BoxCard from "./BoxCard/index.vue";
import ImgCard from "./ImgCard/index.vue";
import RichEditor from "./RichEditor/index.vue";
import Chart from "./Chart/index.vue";
import PageBtn from "./PageBtn/index.vue";
import Upload from "./Upload/index.vue";
import ListEditTable from "./ListEditTable/index.vue";
import SplitBox from "./SplitBox/index.vue";
import List from "./List/index.vue";

const components: Record<string, Component> = {
  Icon,
  Table,
  RowBtns,
  Form,
  FormDialog,
  FormPage,
  DetailDialog,
  IconSelect,
  TreeSelect,
  FuzzySearch,
  ImgCard,
  ListCard,
  BoxCard,
  RichEditor,
  Chart,
  PageBtn,
  Upload,
  ListEditTable,
  SplitBox,
  List,
};

export default (app: App) => {
  // 组件注册
  for (const key in components) {
    const component = components[key];
    app.component(`Fy${key}`, component);
  }

  return app;
};
